<template>
    <div>
        <button @click.one="triggerEvent"> Trigger Custom Even</button>
        <button @click="triggerSubmit">Trigger Submit</button>
    </div>
</template>

<script lang="ts" setup>
const emit=defineEmits<{
    (e:'customEvent',message:string):void;
    (e:'submit',payload:{email:string;passworld:string}):void
}>()
const triggerEvent=()=>{
    emit('customEvent','hello world')
}
const triggerSubmit=()=>{
    const result={email:'user@example.com',passworld:'password123'}
    emit('submit',result)
}
</script>
